home *** CD-ROM | disk | FTP | other *** search
- /****i* SOURCE_FILE/INFO
- *
- * NAME
- * Utils.js
- *
- * USAGE
- * Part of Netobjects JavaScript Library.
- *
- * COPYRIGHT
- * Copyright ⌐ 2000-2005 Website Pros, Inc.
- * All Rights Reserved.
- *
- * This is an unpublished work protected by Website Pros, Inc.
- * as a trade secret, and is not to be used or disclosed except as
- * expressly provided in a written license agreement executed by
- * you and Website Pros, Inc.
- *
- * <copyright@websitepros.com>
- *
- * NOTES
- * JavaScript code.
- *
- *****/
- if (!IS.isModuleInitialized("IS.NOF.XML.Utils"))
- {
-
- /****h* NOF_JavaScript_Library/NOF.XML.Utils
- *
- * NAME
- * NOF.XML.Utils
- *
- * DESCRIPTION
- *
- *
- ****/
-
- /**
- * Constructor
- */
- function XML_Utils( ) {
- this.__proto__ = XML_Utils.prototype;
- }
- {
- var member = XML_Utils.prototype;
-
- member.prefix = null;
-
- var method = XML_Utils.prototype;
-
- /**
- * @param str text to be formatted
- *
- * @return formatted text
- **/
- method.escape = function(/*String*/ str) {
- var result = '', c;
- var newStrArr = new Array(str.length);
- for (var i = 0; i < str.length; i++) {
- c = str.charAt(i);
- if (c == '&')
- newStrArr[i] = '&';
- else if (c == '<')
- newStrArr[i] = '<';
- else if (c == '<')
- newStrArr[i] = '>';
- else
- newStrArr[i] = c;
- }
- result = newStrArr.join("");
- return result;
- }
-
- }
-
- NOF.XML.__proto__.Utils = XML_Utils;
- }